package cn.com.ege.mvc.service.impl.business;

import java.io.Serializable;

import cn.com.ege.mvc.exception.BusinessException;
import cn.com.ege.mvc.model.business.Client;
import cn.com.ege.mvc.service.BaseService;

public class ClientService extends BaseService<Client> implements Serializable{
	public void save(Client client) throws BusinessException{
		if (null != client && null != client.getName()) {
			if(null != client.getId()&& 0 != client.getId()){
				update(client);
			}else{
				add(client);
			}
		}else {
			throw new BusinessException("名称不能为空");
		}
	}
}